<template>
	<view class="comment">
		<view class="header">
			用户评论
		</view>
		<view class="comGrounp" v-for="(v,i) in commentText" :key="i">
			<view class="portrait">
				<image :src="v.evalueLogo" mode=""></image>
			</view>
			<view class="commentText">
				<view>
					<view>
						<view>{{v.feels}}</view>
						<view>{{v.service}}</view>
					</view>
					<view>
						<view>适合新手</view>
						<view>强度适中</view>
					</view>
				</view>
				<view>
					<text>{{v.content}}</text>
				</view>
				<view class="commentImage">
					<image :src="v.evalueImage" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import myRequest from '../../../utils/myRequest.js'
	import store from '../../../store/index.js'
	import {
		reactive,
		toRefs,
		onMounted
	} from 'vue'
	export default {
		setup() {
			let data = reactive({
				myid: '',
				commentText: [],
				getData() {
					myRequest({
						url: '/getevelct',
						method: 'post',
						data: {
							groupId: data.myid
						},
					}).then((res)=>{
						data.commentText = res.data.data
					})
				}
			})
			onMounted(() => {
				uni.getStorage({
					key: 'groupId',
					success: (res) => {
						data.myid = res.data
						data.getData()
					}
				})
			})
			return {
				...toRefs(data)
			}
		}
	}
</script>

<style>
	.comment {
		padding: 20rpx;
	}

	.header {
		font-size: 40rpx;
		font-weight: bold;
	}

	.portrait>image {
		width: 80rpx;
		height: 80rpx;
		border-radius: 80rpx;
	}

	.comGrounp {
		display: flex;
	}

	.commentText {
		padding-left: 15rpx;
		flex: 1;
	}

	.commentText>view:first-child {
		display: flex;
		justify-content: space-between;
		padding-right: 10rpx;
	}

	.commentText>view:first-child>view:first-child>view:last-child {
		font-size: 25rpx;
		color: #999999;
		margin: 10rpx 0;
	}

	.commentText>view:first-child>view:last-child {
		display: flex;
	}

	.commentText>view:first-child>view:last-child>view {
		background: #FFCC66;
		color: #FFFFFF;
		width: 150rpx;
		margin-right: 20rpx;
		line-height: 60rpx;
		text-align: center;
		border-radius: 20rpx;
		height: 60rpx;
	}

	.commentImage>image {
		width: 200rpx;
		height: 200rpx;
		margin: 15rpx;
	}
</style>
